<!DOCTYPE html>
<html lang="en" xmlns:formatter="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="https://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../../jquery-easyui-1.9.15/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../js/time.js"></script>
<link rel="stylesheet" type="text/css" href="../../jquery-easyui-1.9.15/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../jquery-easyui-1.9.15/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../../jquery-easyui-1.9.15/demo/demo.css">
<script>

    $(function () {
        var pager = $('#tt').datagrid('getPager');    // get the pager of datagrid
        // pager.pagination({
        //     showPageList:false,
        //     buttons:[{
        //         iconCls:'icon-search',
        //         handler:function(){
        //             alert('search');
        //         }
        //     },{
        //         iconCls:'icon-add',
        //         handler:function(){
        //             alert('add');
        //         }
        //     },{
        //         iconCls:'icon-edit',
        //         handler:function(){
        //             alert('edit');
        //         }
        //     }],
        //     onBeforeRefresh:function(){
        //         alert('before refresh');
        //         return true;
        //     }
        // });
    })

    function doSearch(){
        $('#tt').datagrid('load',{
            topic: $('#topic').val()
        });
    }
</script>

<body>

<!-- 列表 -->
<table id="tt" title="延迟任务列表" class="easyui-datagrid" style="width:100%;height:500px"
       url="/redisDelay/admin/delayList"
       iconCls="icon-save" pagination="true" toolbar="#tb">
    <thead>
    <tr>
        <th field="jobId" width="200">job Id</th>
        <th field="topic" width="80">主题</th>
        <th field="body" width="500" align="right">内容</th>
        <th field="delayTime" width="120">延迟时间（毫秒）</th>
        <th field="currentRetryTime" width="100" align="center">当前重试次数</th>
        <th field="retries" width="70" align="right">重试次数</th>
        <th field="shoudRunTime" width="180" align="center" formatter="jsonTimeStamp">
            可以运行的时间</th>
    </tr>
    </thead>
</table>
<div id="tb" style="padding:3px">
    <span>主题:</span>
    <input id="topic" placeholder="输入topic" style="line-height:26px;border:1px solid #ccc">
    <a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">搜索</a>
</div>

</body>
</html>